package com.smartprofessor.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * question
 * @author 
 */
@Data
public class Question implements Serializable {
    private Integer id;

    private String contenet;

    private Integer qusType;

    private String answer;

    private Integer askNum;

    private String image;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Question other = (Question) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getContenet() == null ? other.getContenet() == null : this.getContenet().equals(other.getContenet()))
            && (this.getQusType() == null ? other.getQusType() == null : this.getQusType().equals(other.getQusType()))
            && (this.getAnswer() == null ? other.getAnswer() == null : this.getAnswer().equals(other.getAnswer()))
            && (this.getAskNum() == null ? other.getAskNum() == null : this.getAskNum().equals(other.getAskNum()))
            && (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getContenet() == null) ? 0 : getContenet().hashCode());
        result = prime * result + ((getQusType() == null) ? 0 : getQusType().hashCode());
        result = prime * result + ((getAnswer() == null) ? 0 : getAnswer().hashCode());
        result = prime * result + ((getAskNum() == null) ? 0 : getAskNum().hashCode());
        result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", contenet=").append(contenet);
        sb.append(", qusType=").append(qusType);
        sb.append(", answer=").append(answer);
        sb.append(", askNum=").append(askNum);
        sb.append(", image=").append(image);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}